import pymssql
import _mssql
import decimal
import uuid
import utils.utils as utils
import logging
from db.genericDB import genericDB
from datetime import datetime
from utils.utils import csvIntoDict

class mssqldb(genericDB):
    def __init__(self):
        self.config = utils.readConfig()
        self.logger = logging.getLogger('automatic.mssqldb')




    def getConnection(self, host, database, user='', password=''):
        try:
            connection = pymssql.connect(host=host,  database=database, user=user, password =password,  charset='cp1252')
        except Exception as e:
            self.logger.critical('Problem with connection to  host: %s, %s' % (host, e))
        return connection





            
            
            
        
                
                
                
                
                
                
                
                
                
                
                
                
                
                
        
        
